package com.unei.guava.demo.base

import com.google.common.base.Stopwatch
import com.google.common.base.Ticker
import com.google.common.util.concurrent.RateLimiter

import java.util.concurrent.TimeUnit

/**
 * Created by sunlei on 2015/8/26.
 */

Ticker ticker=Ticker.systemTicker()
println ticker.read()

Thread.sleep(1000)
println ticker.read()

RateLimiter rateLimiter=RateLimiter.create(10)
rateLimiter.acquire()
println "xxx"